import { request } from 'umi';
import { createCRUD } from '@/utils/api';

const route = '/ide_stack';

const crud = createCRUD<StackEntity>(route);

export { crud };

export async function getStack(id: string) {
  return await request<StackEntity>(`${route}/get_entity?id=${id}`, {
    method: 'GET',
  });
}

export async function getStackOptions() {
  return await request<[]>(`${route}/get_ide_stack_options`, {
    method: 'GET',
  });
}
